package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 答题记录对象 user_answers
 * 
 * @author ruoyi
 * @date 2025-05-09
 */
public class UserAnswers extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录编号 */
    private Long recordId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 题目ID */
    @Excel(name = "题目ID")
    private Long questionId;

    /** 用户选择的答案 */
    @Excel(name = "用户选择的答案")
    private String selectedAnswer;

    /** 正确答案（冗余存储） */
    @Excel(name = "正确答案", readConverterExp = "冗=余存储")
    private String correctAnswer;

    /** 本次获得金币 */
    @Excel(name = "本次获得金币")
    private Long coinsEarned;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }

    public void setSelectedAnswer(String selectedAnswer) 
    {
        this.selectedAnswer = selectedAnswer;
    }

    public String getSelectedAnswer() 
    {
        return selectedAnswer;
    }

    public void setCorrectAnswer(String correctAnswer) 
    {
        this.correctAnswer = correctAnswer;
    }

    public String getCorrectAnswer() 
    {
        return correctAnswer;
    }

    public void setCoinsEarned(Long coinsEarned) 
    {
        this.coinsEarned = coinsEarned;
    }

    public Long getCoinsEarned() 
    {
        return coinsEarned;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("userId", getUserId())
            .append("questionId", getQuestionId())
            .append("selectedAnswer", getSelectedAnswer())
            .append("correctAnswer", getCorrectAnswer())
            .append("coinsEarned", getCoinsEarned())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
